package com.cskaoyan.eighth.controller;

import com.cskaoyan.eighth.bean.BaseListData;
import com.cskaoyan.eighth.bean.BaseRespVo;
import com.cskaoyan.eighth.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("admin/user")
public class UserController {

    @Autowired
    UserService userService;
    @RequestMapping("list")
    public BaseRespVo list(Integer page, Integer limit , String sort, String order){
        BaseListData data = userService.queryUsers(page,limit,sort,order);
        return BaseRespVo.ok(data);
    }
}
